package com.panan;

import com.panan.GenTool.GenEntity;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

public class Config {

    public static final Map<String,String> map = new HashMap<String,String>();

    public static final Map<String,List<String>> colMap = new HashMap<String, List<String>>();

    static {
        InputStream in = GenEntity.class.getClass().getResourceAsStream("/config.properties");
        Properties properties = new Properties();
        try {
            properties.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        map.put("database.location",properties.getProperty("database.location"));
        map.put("database.user.account",properties.getProperty("database.user.account"));
        map.put("database.user.password",properties.getProperty("database.user.password"));
        map.put("database.driver",properties.getProperty("database.driver"));
        map.put("database.table",properties.getProperty("database.table"));
        map.put("entity.calss.output.package",properties.getProperty("entity.calss.output.package"));
        map.put("entity.annotation.author",properties.getProperty("entity.annotation.author"));
        map.put("mapper.basemapper.location",properties.getProperty("mapper.basemapper.location"));
        map.put("mapper.basemapper",properties.getProperty("mapper.basemapper"));
        map.put("mapper.entity.extends.basemapper",properties.getProperty("mapper.entity.extends.basemapper"));
        map.put("mapper.basemapper.name",properties.getProperty("mapper.basemapper.name"));
        map.put("service.baseservice.location",properties.getProperty("service.baseservice.location"));
        map.put("service.baseservice.name",properties.getProperty("service.baseservice.name"));
        map.put("service.impl.location",properties.getProperty("service.impl.location"));
        map.put("service.baseservice",properties.getProperty("service.baseservice"));
        map.put("mapper.entity.method",properties.getProperty("mapper.entity.method"));
        map.put("mapper.entity.insert",properties.getProperty("mapper.entity.insert"));
        map.put("mapper.entity.update",properties.getProperty("mapper.entity.update"));
        map.put("mapper.entity.delete",properties.getProperty("mapper.entity.delete"));
        map.put("mapper.entity.findall",properties.getProperty("mapper.entity.findall"));
        map.put("service.entity.method",properties.getProperty("service.entity.method"));
        map.put("service.entity.insert",properties.getProperty("service.entity.insert"));
        map.put("service.entity.update",properties.getProperty("service.entity.update"));
        map.put("service.entity.delete",properties.getProperty("service.entity.delete"));
        map.put("service.entity.findall",properties.getProperty("service.entity.findall"));
        map.put("mapper.xml",properties.getProperty("mapper.xml"));
        map.put("controller.location",properties.getProperty("controller.location"));
        map.put("controller.name",properties.getProperty("controller.name"));
        map.put("mapper.xml.location",properties.getProperty("mapper.xml.location"));
    }

}
